package com.smartticket.jeju.controller.admin;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.smartticket.jeju.model.User;
import com.smartticket.jeju.service.UserService;

@Controller
@RequestMapping("/admin")
public class UserList {
	@Autowired
	private UserService userService;
	
	
	@RequestMapping("/userList")
	public ModelAndView action()
	{
		ModelAndView modelAndView = new ModelAndView();
		
		List<User> users = userService.list();
		
		modelAndView.addObject("users", users);
		
		return modelAndView;
	}
}
